package cn.broadin.app.hotel.component;

import android.support.annotation.Keep;

import java.io.Serializable;

@Keep
public class BaseViewData implements Serializable {

    public static final int TYPE_OPEN_HTTP = 1;
    public static final int TYPE_START_APP = 2;
    public static final int TYPE_START_ACTIVITY = 3;

    public static final int STYPE_SETTYINGS = 1;

    /**
     * 组件id
     */
    public Integer id;

    /**
     * 组件名称
     */
    public String name;

    /**
     * 组件类型
     */
    public String type;

    // 组件宽度
    public Integer width;

    // 组件高度
    public Integer height;

    // 左边距
    public Integer left;

    // 上边距
    public Integer top;

    // 是否获取焦点
    public boolean focusable = false;

    // 是否可以点击
    public boolean clickable;

    /**
     * 是否需要授权才能观看
     */
    public boolean authable;

    /**
     * 连接跳转类型 0 打开http网页  1 启动第三方APP
     */
    public Byte link;

    /**
     * 跳转子类型
     */
    public Byte slink;

    /**
     * 链接跳转参数
     */
    public String params;


    /**
     * 屏幕层级
     */
    public int zindex = 0;

    public void setLayout(Integer width, Integer height, Integer left, Integer top){
        this.width = width;
        this.height = height;
        this.left = left;
        this.top = top;
    }
}
